<script type="text/javascript">
var editor ;
KindEditor.ready(function(K) {
	editor = K.create('#content', {
		themeType : 'simple',
		width:"100%",
		resizeType:0,
		uploadJson : "/res/image/upload.html",
		items : ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
        allowFileManager : false,
		fontsize:16
	});
});
KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}";
</script>
<div style="background: #FFFFFF;" >
<div class="uk-layui-form">
	<form class="layui-form" action="/apps/topic/save.html" method="post" enctype="multipart/form-data">
		<#if type??><input type="hidden" name="type" value="${type!''}"></#if>
		<div class="layui-collapse">
			<div class="layui-colla-item">
				<h2 class="layui-colla-title">请填写知识基本信息
				</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline" style="width: 100%;">
							<label class="layui-form-label" id="cusname" style="width: 6%;">知识主标题：</label>
							<div class="layui-input-inline" style="width: 85%;height: 50px;">
								<input type="text" name="title" required  lay-verify="required" autocomplete="off" maxlength="255"
									class="layui-input">
									
							</div>
							<i style="color:red;">*</i>
						</div>
					</div>
					
					
					
					<div class="layui-form-item">
						<div class="layui-inline" style="width: 100%;">
							<label class="layui-form-label" style="width: 6%;">类似问题：</label>
							<div class="layui-input-inline" style="width: 85%;" id="mlt">
								<div style="margin-bottom:5px;position: relative;" class="mlt_item">
									<input type="text" name="silimar" autocomplete="off" value="" class="layui-input" maxlength="255" style="width: 97%;">
									<span style="position: absolute;right:0px;top:0px;">
										<a href="javascript:void(0)" onclick="$('#mlt').append($(this).closest('.mlt_item').prop('outerHTML'));">
											<label style="color:#5FB878;font-size:15px;"><i class="layui-icon">&#xe608;</i></label>
										</a>
										<a href="javascript:void(0)" onclick="if($('.mlt_item').length > 1){$(this).closest('.mlt_item').remove();}else{top.layer.alert('类似问题最少需要保留一个，如果不需要，请删除内容');}" class="ukefu-group-remove">
											<label style="color:#5FB878;font-size:15px;"><i class="layui-icon">&#x1006;</i></label>
										</a>
									</span>
								</div>
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline" style="width: 100%;">
							<label class="layui-form-label" style="width: 6%;">知识有效期：</label>
						
							<div class="layui-input-inline">
								<input type="text" name="begintime" id="begintime" readOnly="readOnly" autocomplete="off" placeholder="开始日期"
									class="layui-input" data-datetype="laydate">
								<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;">&#xe637;</i>
							</div>
							
							<div class="layui-input-inline">
								<input type="text" id="endtime" name="endtime" autocomplete="off" class="layui-input" data-datetype="laydate"  placeholder="结束日期">
								<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;">&#xe637;</i>
							</div>
						</div>
						
					</div>
					
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">热点问题：</label>
							<div class="layui-input-inline" style="width:auto;">
								<div class="layui-input-block">
									<input type="radio" name="top" value="1" title="是（出现在访客对话页面右侧热门问题）"> 
									<input type="radio" name="top" value="0" title="否" checked>
								</div>
							</div>
						</div>
						
					</div>
					<div class="layui-form-item">
					    <label class="layui-form-label">序号：</label>
					    <div class="layui-input-inline">
					      <input type="number" min="0" max="10000" value="0" name="sortindex" placeholder="序号" autocomplete="off" class="layui-input">
					    </div>
					  </div>
					
				</div>
			</div>
			
			
			<div class="layui-colla-item">
				<h2 class="layui-colla-title">请填写知识内容</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline" style="width: 100%;">
							<div class="layui-input-inline" style="width: 100%;">
								<textarea name="content"  id="content" placeholder="请输入内容" class="layui-textarea" style="resize:none;width:100%;height:1000px;" maxlength="255" ></textarea>
							</div>
						</div>
					</div>
				</div>
			</div>
			
		<div class="layui-form-button" style="position:relative;">
			<div class="layui-button-block">
				<button class="layui-btn" lay-submit  lay-filter="formDemo">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
		</div>
		
		
	</form>
</div>
 <script>
//Demo
layui.use('laydate', function() {
	var laydate = layui.laydate;
});
layui.use('form', function(){
  var form = layui.form;
  form.render(); //更新全部
 
});


$(document).ready(function(){
	
	
});
</script>

